﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="eventDetail.aspx.vb" Inherits="bookmeetprototype.eventDetail" %>
<%@ Register Assembly="GMaps" Namespace="Subgurim.Controles" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<ul class="breadcrumb">
    <li><a runat="server" href="~/Default.aspx">Home</a> <span class="divider">/</span></li>
    <li><a runat="server" href="~/calendar.aspx">Calendar</a> <span class="divider">/</span></li>
    <li class="active">Book Meeting Details</li>
    </ul>

    <asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" 
        DataSourceID="eventDetailSource" Height="201px" Width="627px" 
        DataKeyNames="EventID" style="margin-top: 0px">
        <CommandRowStyle Font-Bold="True" BackColor="#CCCCCC" Wrap="False" />
        <Fields>
            <asp:BoundField DataField="EventTitle" HeaderText="Event Title" 
                SortExpression="EventTitle" />
            <asp:BoundField DataField="EventDescription" HeaderText="Event Description" 
                SortExpression="EventDescription" />
            <asp:BoundField DataField="EventDate" dataformatstring="{0:MMMM d, yyyy}" HeaderText="Event Date" 
                SortExpression="EventDate" />
            <asp:BoundField DataField="EventCategory" HeaderText="Event Privacy" 
                SortExpression="EventCategory" />
            <asp:BoundField DataField="CreatedBy" HeaderText="Created By" 
                SortExpression="CreatedBy" />
            <asp:BoundField DataField="StreetAddress" HeaderText="Street Address" 
                SortExpression="StreetAddress" />
            <asp:BoundField DataField="Town" HeaderText="Town" SortExpression="Town" />
            <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" 
                ShowInsertButton="True" />
        </Fields>
    </asp:DetailsView>
    <br /><asp:HyperLink runat="server" NavigateUrl="~/calendar.aspx">Go back to your Calendar!</asp:HyperLink>
    <asp:SqlDataSource ID="eventDetailSource" runat="server" 
        ConnectionString="<%$ ConnectionStrings:BookMeetConnString %>" 
        ProviderName="<%$ ConnectionStrings:BookMeetConnString.ProviderName %>" 
        SelectCommand="SELECT * FROM [Events] WHERE ([EventID] = ?)" 
        UpdateCommand="UPDATE [Events] SET [EventTitle] = ?, [EventDescription] = ?, [EventDate] = ?, [EventCategory] = ?, [CreatedBy] = ?, [StreetAddress] = ?, [Town] = ?, [Country] = ?, [Coordinates] = ? WHERE [EventID] = ?" 
        DeleteCommand="DELETE FROM [Events] WHERE [EventID] = ?" 
        InsertCommand="INSERT INTO [Events] ([EventID], [EventTitle], [EventDescription], [EventDate], [EventCategory], [CreatedBy], [StreetAddress], [Town], [Country], [Coordinates]) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)">
        <DeleteParameters>
            <asp:Parameter Name="EventID" Type="Int32" />
        </DeleteParameters>
        <InsertParameters>
            <asp:Parameter Name="EventID" Type="Int32" />
            <asp:Parameter Name="EventTitle" Type="String" />
            <asp:Parameter Name="EventDescription" Type="String" />
            <asp:Parameter Name="EventDate" Type="DateTime" />
            <asp:Parameter Name="EventCategory" Type="Int32" />
            <asp:Parameter Name="CreatedBy" Type="String" />
            <asp:Parameter Name="StreetAddress" Type="String" />
            <asp:Parameter Name="Town" Type="String" />
            <asp:Parameter Name="Country" Type="String" />
            <asp:Parameter Name="Coordinates" Type="String" />
        </InsertParameters>
        <SelectParameters>
        
        <asp:QueryStringParameter DefaultValue="1" Name="EventID" QueryStringField="ID" 
                Type="Int32" />
        
        </SelectParameters>
        <UpdateParameters>
            <asp:Parameter Name="EventTitle" Type="String" />
            <asp:Parameter Name="EventDescription" Type="String" />
            <asp:Parameter Name="EventDate" Type="DateTime" />
            <asp:Parameter Name="EventCategory" Type="Int32" />
            <asp:Parameter Name="CreatedBy" Type="String" />
            <asp:Parameter Name="StreetAddress" Type="String" />
            <asp:Parameter Name="Town" Type="String" />
            <asp:Parameter Name="Country" Type="String" />
            <asp:Parameter Name="Coordinates" Type="String" />
            <asp:Parameter Name="EventID" Type="Int32" />
        </UpdateParameters>
    </asp:SqlDataSource>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="SidebarContent" runat="server">
 <ul class="nav nav-list">
              <ul class="nav nav-list">
              <li class="nav-header">Account</li>
              <li><a id="A1" runat="server" href="~/Account/Register.aspx">Register</a></li>
              <li><a id="A2" runat="server" href="~/Account/editprofile.aspx">Edit Profile</a></li>
              <li><a id="A3" runat="server" href="~/Account/signupbc.aspx">Book Club Registration</a></li>
              <li class="nav-header">Superuser</li>
              <li><a id="A4" runat="server" href="~/ArticleAdmin.aspx">Write Articles</a></li>
              <li class="nav-header">Miscellaneous</li>
              <li><a id="A5" runat="server" href="~/rss.ashx">RSS Feed</a></li>
              <li><a id="A6" runat="server" href="~/browsem.aspx">Search Users</a></li>
              <li><a id="A7" runat="server" href="~/browsec.aspx">Search Book Clubs</a></li>
              <li><a id="A8" runat="server" href="~/bookshelf.aspx">Your Bookshelf</a></li>
              <li><a id="A9" runat="server" href="~/faq.aspx">FAQs</a></li>
            </ul>
    </asp:Content>
